<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<style type="text/css">
<!--
#demo {
	background: #FFF;
	overflow: hidden;
	width: 678px;
}

#indemo {
	float: left;
	width: 1024%;
}

#demo1 {
	float: left;
}

#demo2 {
	float: left;
}

#demo img {
	height: 278px;
}

#demo1 img {
	height: 278px;
}

#demo2 img {
	height: 278px;
}

#MODBLK_239 {
	margin:0;
	padding: 0;
	display: block;
}
-->
</style>
<c:choose>
	<c:when test="${empty banner}">
		<div id="MODBLK_239">
			<div>
			
			
			<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
				 width="678" height="369" id="FlashID2" title="校园风景概览">
				<param name="movie" value="share/GRb3BtoN.swf"" />
				<param name="quality" value="high" />
				<param name="wmode" value="opaque" />
				<param name="swfversion" value="9.0.45.0" />
				<param name="expressinstall" value="ext/resources/expressInstall.swf" />
				<object type="application/x-shockwave-flash" data="share/GRb3BtoN.swf""
					 width="678" height="369">
					<param name="quality" value="high" />
					<param name="wmode" value="opaque" />
					<param name="swfversion" value="9.0.45.0" />
					<param name="expressinstall" value="ext/resources/expressInstall.swf" />
					<div>
						<h4>
							此页面上的内容需要较新版本的 Adobe Flash Player。
						</h4>
						<p>
							<a href="http://www.adobe.com/go/getflashplayer"> <img
									src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
									alt="获取 Adobe Flash Player" width="112" height="33" />
							</a>
						</p>
					</div>
				</object>
			</object>
			</div>
		</div>
	</c:when>
	<c:otherwise>
		<div id="demo">

			<div id="indemo">

				<div id="demo1">
					<c:forEach items="${banner}" var="product">
						<c:forEach var="img" items="${product.images}" varStatus="num">
							<c:if test="${num.index==0}">
								<a
									href="<%=basePath%>${product.category.whoCategory}View.action?${product.category.whoCategory}Id=${product.id}"
									title="${product.name }"> <img src="${img.path }"
										border="0" /> </a>
							</c:if>
						</c:forEach>
					</c:forEach>
				</div>

				<div id="demo2"></div>

			</div>

		</div>
		<script>

<!--

var speed=15; //数字越大速度越慢

var tab=document.getElementById("demo");

var tab1=document.getElementById("demo1");

var tab2=document.getElementById("demo2");

tab2.innerHTML=tab1.innerHTML;

function Marquee(){

if(tab2.offsetWidth-tab.scrollLeft<=0)

tab.scrollLeft-=tab1.offsetWidth

else{

tab.scrollLeft++;

}

}

var MyMar=setInterval(Marquee,speed);

tab.onmouseover=function() {clearInterval(MyMar)};

tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};

-->

</script>
	</c:otherwise>
</c:choose>